xend: detect and report qemu-dm failure
Currently, when qemu-dm fails, typically its exit status is lost and
xend doesn't notice. In the patch below I use a fifo (named pipe) to
detect qemu-dm's termination and report the exit status to the
logfile, if possible. (If xend has been restarted since the domain
was created, this isn't possible but we can still know that it failed
and report that fact.)
It would be better to have a failure of qemu crash the domain, by
calling the SCHEDOP_shutdown hypercall with SHUTDOWN_crash. However
if you have on_crash=restart and the configuration is broken in some
way that causes qemu-dm to bomb out straight away this causes xend to
spin endlessly restarting the doomed domain. This is a general
problem with on_*=restart and ought to be fixed separately. When it
is fixed, we can safely arrange for domains whose dm has crashed to be
themselves forcibly crashed.
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>